.class public Lcom/instagram/android/directshare/i/a;
.super Landroid/widget/BaseAdapter;
.source "RequestedDirectSharesAdapter.java"


# instance fields
.field private a:Lcom/instagram/android/directshare/i/o;

.field private b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/instagram/android/directshare/e/a;",
            ">;"
        }
    .end annotation
.end field

.field private c:Landroid/content/Context;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/instagram/android/directshare/i/o;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 27
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 28
    iput-object p1, p0, Lcom/instagram/android/directshare/i/a;->c:Landroid/content/Context;

    .line 29
    iput-object p2, p0, Lcom/instagram/android/directshare/i/a;->a:Lcom/instagram/android/directshare/i/o;

    .line 30
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    .line 31
    return-void
.end method

.method private a(ILandroid/view/ViewGroup;)Landroid/view/View;
    .locals 2
    .parameter
    .parameter

    .prologue
    .line 34
    invoke-virtual {p0, p1}, Lcom/instagram/android/directshare/i/a;->getItemViewType(I)I

    move-result v0

    .line 35
    packed-switch v0, :pswitch_data_0

    .line 41
    new-instance v0, Ljava/lang/IllegalArgumentException;

    const-string v1, "Unsupported view type"

    invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 37
    :pswitch_0
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->c:Landroid/content/Context;

    invoke-static {v0, p2}, Lcom/instagram/android/directshare/i/l;->a(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 39
    :goto_0
    return-object v0

    :pswitch_1
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->c:Landroid/content/Context;

    invoke-static {v0, p2}, Lcom/instagram/android/directshare/i/l;->b(Landroid/content/Context;Landroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    goto :goto_0

    .line 35
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method private a(Landroid/view/View;I)V
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 46
    invoke-virtual {p0, p2}, Lcom/instagram/android/directshare/i/a;->getItemViewType(I)I

    move-result v0

    .line 47
    const/4 v1, 0x1

    if-ne v0, v1, :cond_1

    .line 48
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/directshare/i/q;

    invoke-virtual {p0, p2}, Lcom/instagram/android/directshare/i/a;->getItem(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/instagram/android/directshare/e/a;

    iget-object v2, p0, Lcom/instagram/android/directshare/i/a;->a:Lcom/instagram/android/directshare/i/o;

    invoke-static {v0, v1, p2, v2}, Lcom/instagram/android/directshare/i/l;->a(Lcom/instagram/android/directshare/i/q;Lcom/instagram/android/directshare/e/a;ILcom/instagram/android/directshare/i/o;)V

    .line 61
    :cond_0
    :goto_0
    return-void

    .line 54
    :cond_1
    if-nez v0, :cond_0

    .line 55
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->c:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/directshare/i/p;

    iget-object v2, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    invoke-static {v1, v0, v2}, Lcom/instagram/android/directshare/i/l;->a(Landroid/content/res/Resources;Lcom/instagram/android/directshare/i/p;I)V

    goto :goto_0
.end method


# virtual methods
.method public a()I
    .locals 1

    .prologue
    .line 87
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public a(Lcom/instagram/android/directshare/e/a;)V
    .locals 1
    .parameter

    .prologue
    .line 64
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->remove(Ljava/lang/Object;)Z

    .line 65
    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/a;->notifyDataSetChanged()V

    .line 66
    return-void
.end method

.method public a(Ljava/util/List;)V
    .locals 1
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Lcom/instagram/android/directshare/e/a;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 96
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 97
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 98
    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/a;->notifyDataSetChanged()V

    .line 99
    return-void
.end method

.method public b()V
    .locals 1

    .prologue
    .line 91
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 92
    invoke-virtual {p0}, Lcom/instagram/android/directshare/i/a;->notifyDataSetChanged()V

    .line 93
    return-void
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 70
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 71
    const/4 v0, 0x0

    .line 73
    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 2
    .parameter "position"

    .prologue
    .line 108
    add-int/lit8 v0, p1, -0x1

    .line 109
    if-ltz v0, :cond_0

    iget-object v1, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge v0, v1, :cond_0

    .line 110
    iget-object v1, p0, Lcom/instagram/android/directshare/i/a;->b:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0

    .line 112
    :cond_0
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V

    throw v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 118
    const-wide/16 v0, 0x0

    return-wide v0
.end method

.method public getItemViewType(I)I
    .locals 1
    .parameter "position"

    .prologue
    .line 79
    if-nez p1, :cond_0

    .line 80
    const/4 v0, 0x0

    .line 82
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 0
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 123
    if-nez p2, :cond_0

    .line 124
    invoke-direct {p0, p1, p3}, Lcom/instagram/android/directshare/i/a;->a(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 126
    :cond_0
    invoke-direct {p0, p2, p1}, Lcom/instagram/android/directshare/i/a;->a(Landroid/view/View;I)V

    .line 127
    return-object p2
.end method

.method public getViewTypeCount()I
    .locals 1

    .prologue
    .line 103
    const/4 v0, 0x2

    return v0
.end method
